/*
 * HostManager.h
 *
 *  Created on: May 16, 2011
 *      Author: Fei Jia
 */

#ifndef HOSTMANAGER_H_
#define HOSTMANAGER_H_

#include <memory>
#include <omnetpp.h>
#include <map>

struct HostInfo;
class Radio;
class SIM_API cXMLElement;

class HostManager
{
private:
	static std::auto_ptr<HostManager> _instance;
	friend class std::auto_ptr<HostManager>;
	std::map<int, Radio *> mapIdRadio;
	std::map<int, HostInfo *> mapIdHostInfo;
public:
	HostManager();
	virtual ~HostManager();
	static HostManager* getInstance();
	void InitializeHostInfo(cXMLElement *xmlDoc);
	void AddHostRadio(int hostId, Radio *radio);

	Radio* getHostRadio(int hostId);
	HostInfo* getHostInfo(int hostId);
};

#endif /* HOSTMANAGER_H_ */
